<?
/***
*    This file is part of Marketorama.
*
*    Marketorama is free software: you can redistribute it and/or modify
*    it under the terms of the GNU General Public License as published by
*    the Free Software Foundation, either version 3 of the License, or
*    (at your option) any later version.
*
*    Marketorama is distributed in the hope that it will be useful,
*    but WITHOUT ANY WARRANTY; without even the implied warranty of
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR *PURPOSE.  See the
*    GNU General Public License for more details.
*
*    You should have received a copy of the GNU General Public License
*    along with Marketorama.  If not, see <http://www.gnu.org/licenses/>.
***/
?>
<div id="main">
    <h1>My Apps</h1>
    <div id="boxlist">
        <? foreach($query as $row): ?>
            <div class="boxitem">
                <div class="text">
                    <div class="boxname">
                        <a href="<?=site_url('myapps/'.$row->AppUrl)?>"><? echo($row->AppName); ?></a>
                        <? if ($row->AppPublic): ?>
<!--                            <a href="<?=site_url('app/'.$row->AppUrl)?>"><? echo($row->AppName); ?></a> -->
                            <img class="iconright" src="../img/unlock.png" alt="The application is public"/>
                        <? else: ?>
<!--                            <a href="<?=site_url('myapps/'.$row->AppUrl)?>"><? echo($row->AppName); ?></a> -->
                            <img class="iconright" src="../img/lock.png" alt="The application is not public"/>
                        <? endif ?>
                    </div> <!-- end boxname -->
                    
                    <div class="boxtext">
                        <? if (strlen($row->AppDescription)>255)
                            $AppDescription=substr($row->AppDescription,0,255).'...';
                           else
                            $AppDescription=$row->AppDescription;
                           echo($AppDescription); ?>
                    </div> <!-- end boxtext -->
                    
                </div> <!-- end text -->
                
            </div> <!-- end boxitem -->
        <?php endforeach ?>
        <div class="boxitem">
            <img class="icon" src="../img/add.png"/>
            <div class="text">
                <a href="<?=site_url('apps/newapp')?>" class="boxname">Create new App</a>
    
                <div>Register a new Android application to be tracked</div>
            </div> <!-- end text -->
        </div> <!-- end boxitem -->
    </div> <!-- end boxlist -->
</div><!-- end main -->

